package com.newsee.remote.ecommerce.controller;

import com.newsee.remote.common.bean.JsonResult;
import com.newsee.remote.ecommerce.service.ICommerceService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author liangzhi.chen
 * @description 电商平台公共controller
 * @date 2019/7/16 上午 11:54
 **/
@RestController
@RequestMapping("/commerce")
public class CommerceController {

    private final ICommerceService iCommerceService;

    public CommerceController(ICommerceService iCommerceService) {
        this.iCommerceService = iCommerceService;
    }

    @ApiOperation(value = "电商平台开启同步接口")
    @GetMapping
    public JsonResult sync() {
        return iCommerceService.sync();
    }

}
